package a.student.library;

import android.database.Cursor;

public class Semester {
	public int id;
	public String semesterName;
	public String dateStart;
	public String dateEnd;
	
//	cv.put("S_Name", semesterInfo.semesterName);
//	cv.put("Date_Start", semesterInfo.dateStart);
//	cv.put("Date_End", semesterInfo.dateEnd);
	public static final String SEMESTER_ID = "S_ID";
	public static final String SEMESTER_SNAME = "S_Name";
	public static final String SEMESTER_DATESTART = "Date_Start";
	public static final String SEMESTER_DATEEND = "Date_End";
	
	public static final String SEMESTER_TBL_NAME = "Semester";
	public static final String SEMESTER_DEFAULT_SORT_ORDER = SEMESTER_ID + " ASC";

	public Semester(Cursor c){
		this.id = c.getInt(c.getColumnIndex(SEMESTER_ID));
		this.semesterName = c.getString(c.getColumnIndex(SEMESTER_SNAME));
		this.dateStart = c.getString(c.getColumnIndex(SEMESTER_DATESTART));
		this.dateEnd = c.getString(c.getColumnIndex(SEMESTER_DATEEND));
	}
	
	public Semester(int id,String semesterName,String dateStart,String dateEnd){
		this.id = id;
		this.semesterName = semesterName;
		this.dateStart = dateStart;
		this.dateEnd = dateEnd;
	}

	public int getSemesterId() {
		return id;
	}

	public void setSemesterId(int id) {
		this.id = id;
	}
	
	
}
